package com.xiyou.luckdraw.api.dto.user;

import com.xiyou.luckdraw.common.constants.ResultCodeConstants;
import com.xiyou.luckdraw.common.exception.ValidateException;
import com.xiyou.luckdraw.common.result.AbstractRequest;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * @ClassName: UpdateExchangeRequest
 * @Description:
 * @author: limingxing
 * @Date: 2019-10-21 14:26
 */
@Data
@ApiModel(value = "更新用户兑换状态请求")
public class UpdateExchangeRequest extends AbstractRequest {

    private Long exchangeId;
    private Integer status;
    @Override
    public void requestCheck() {
        if(null == exchangeId || null == status ){
            throw new ValidateException(
                    ResultCodeConstants.REQUISITE_PARAMETER_NOT_EXIST.getCode(),
                    ResultCodeConstants.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }
    }
}
